﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="产品质保书.aspx.cs" Inherits="syc.ZhiJian.产品质保书" %>
<script runat="server">
    
    protected NPOI.HSSF.UserModel.HSSFWorkbook hssfworkbook;
    protected int 产品ID;
    protected string 螺纹形式;
    protected string pinming;
    protected string gangji;
    protected string guige;
    protected string 合同号;
    protected string 总长度;
    protected string 总重量;
    protected string 总支数;
    protected string 总件数;
    protected string 订货单位;
    protected int 序号;
    protected string 炉号;
    protected DateTime 日期;
    protected string[] luhaoArray = new string[10];
    protected string[] C = new string[10];
    protected string[] Mn = new string[10];
    protected string[] Si = new string[10];
    protected string[] P = new string[10];
    protected string[] S = new string[10];
    protected string[] Cr = new string[10];
    protected string[] Ni = new string[10];
    protected string[] Cu = new string[10];
    protected string[] Mo = new string[10];
    protected string[] Al = new string[10];
    protected string[] V = new string[10];
    protected string[] Bi = new string[10];
    protected string[] Sn = new string[10];
    protected string[] Pb = new string[10];
    protected string[] As = new string[10];
    protected string[] Sb = new string[10];
    protected string[] 抗拉强度 = new string[10];
    protected string[] 屈服极限 = new string[10];
    protected string[] 伸长率 = new string[10];
    protected string[] 横向冲击 = new string[10];
    protected string[] 纵向冲击 = new string[10];
    protected string[] 通径检验 = new string[10];
    protected string[] 静水压试验 = new string[10];
    protected string[] 无损探伤 = new string[10];
    protected string[] 表面检验 = new string[10];
    protected string[] 尺寸 = new string[10];
    protected string[] 捆号 = new string[30];
    protected string 车号 = "";
    protected string 备注 = "";
    protected int count = 0;//统计炉号个数
    protected int kunhaoCount = 0;//统计捆数    

    protected void Page_Load(object sender, EventArgs e)
    {
	    螺纹形式="";
        if (RiQi.Text == "")
        {
            Button_Query_Click(null, null);
            RiQi.Text = 日期.ToString("yyyy年MM月dd日");
            chanpinbianhao.Text = "见产品出库清单";
        }

    }

    protected void WriteToFile()
    {
        DateTime d;
        if (!DateTime.TryParse(this.RiQi.Text, out d))
        {
            d = DateTime.Today;
        }
        Response.ContentType = "application/ms-excel";
        Response.AddHeader("content-disposition", "attachment; filename=\"" + d.ToShortDateString() + ".xls\"");
        hssfworkbook.Write(Response.OutputStream);
    }

    protected void InitializeWorkbook()
    {

        System.IO.FileStream file = new System.IO.FileStream(HttpContext.Current.Server.MapPath("/ZhiJian/模板/产品质量证明书.xls"), System.IO.FileMode.Open, System.IO.FileAccess.Read);

        hssfworkbook = new NPOI.HSSF.UserModel.HSSFWorkbook(file);

        NPOI.HPSF.DocumentSummaryInformation dsi = NPOI.HPSF.PropertySetFactory.CreateDocumentSummaryInformation();
        dsi.Company = "产品质量证明书";
        hssfworkbook.DocumentSummaryInformation = dsi;

        NPOI.HPSF.SummaryInformation si = NPOI.HPSF.PropertySetFactory.CreateSummaryInformation();
        si.Subject = "报表";
        si.Title = "产品质量证明书";
        hssfworkbook.SummaryInformation = si;
    }

    protected void Button_Save_Click(object sender, EventArgs e)
    {

        InitializeWorkbook();
        NPOI.HSSF.UserModel.HSSFSheet sheet1 = hssfworkbook.GetSheet("产品质保书");
        NPOI.HSSF.UserModel.HSSFSheet sheet2 = hssfworkbook.GetSheet("产品质保书1");
        sheet1.GetRow(6).GetCell(2).SetCellValue(this.RiQi.Text);
        Button_Query_Click(null, null);
        sheet1.GetRow(5).GetCell(2).SetCellValue("丰源公司-" + 订货单位);
        sheet1.GetRow(6).GetCell(14).SetCellValue(序号);
        sheet2.GetRow(6).GetCell(2).SetCellValue(this.RiQi.Text);
        sheet2.GetRow(5).GetCell(2).SetCellValue("丰源公司-" + 订货单位);
        sheet2.GetRow(6).GetCell(14).SetCellValue(序号);
        sheet1.GetRow(7).GetCell(1).SetCellValue(pinming);
        sheet1.GetRow(7).GetCell(10).SetCellValue("   " + 合同号);
        sheet1.GetRow(8).GetCell(1).SetCellValue(gangji);
        sheet1.GetRow(8).GetCell(4).SetCellValue(guige);
        sheet1.GetRow(8).GetCell(9).SetCellValue(总长度);
        if (产品ID == 1 || 产品ID == 3)
        {
            螺纹形式 = "NU";
        }
        if (产品ID == 2 || 产品ID == 4 || 产品ID == 5 || 产品ID == 7)
        {
            螺纹形式 = "LC";
        }
        if (产品ID ==6)
        {
            螺纹形式 = "STC";
        }
        sheet1.GetRow(8).GetCell(15).SetCellValue(螺纹形式);

        sheet1.GetRow(9).GetCell(1).SetCellValue(总重量);
        sheet1.GetRow(9).GetCell(3).SetCellValue(总支数);
        sheet1.GetRow(9).GetCell(6).SetCellValue(总件数);
//int 炉号Count = luhaoArray.Length;
        for (int i = 0; i < luhaoArray.Length; i++)
        {
            if (i < 5)
            {
                sheet1.GetRow(12 + i).GetCell(0).SetCellValue(luhaoArray[i]);
                sheet1.GetRow(12 + i).GetCell(1).SetCellValue(C[i]);
                sheet1.GetRow(12 + i).GetCell(2).SetCellValue(Mn[i]);
                sheet1.GetRow(12 + i).GetCell(3).SetCellValue(Si[i]);
                sheet1.GetRow(12 + i).GetCell(4).SetCellValue(P[i]);
                sheet1.GetRow(12 + i).GetCell(5).SetCellValue(S[i]);
                sheet1.GetRow(12 + i).GetCell(6).SetCellValue(Cr[i]);
                sheet1.GetRow(12 + i).GetCell(7).SetCellValue(Ni[i]);
                sheet1.GetRow(12 + i).GetCell(8).SetCellValue(Cu[i]);
                sheet1.GetRow(12 + i).GetCell(9).SetCellValue(Mo[i]);
                sheet1.GetRow(12 + i).GetCell(10).SetCellValue(Al[i]);
                sheet1.GetRow(12 + i).GetCell(11).SetCellValue(Bi[i]);
                sheet1.GetRow(12 + i).GetCell(12).SetCellValue(Sn[i]);
                sheet1.GetRow(12 + i).GetCell(13).SetCellValue(Pb[i]);
                sheet1.GetRow(12 + i).GetCell(14).SetCellValue(As[i]);
                sheet1.GetRow(12 + i).GetCell(15).SetCellValue(Sb[i]);
                sheet1.GetRow(19 + i).GetCell(0).SetCellValue(luhaoArray[i]);
                sheet1.GetRow(19 + i).GetCell(1).SetCellValue(抗拉强度[i]);
                sheet1.GetRow(19 + i).GetCell(3).SetCellValue(屈服极限[i]);
                sheet1.GetRow(19 + i).GetCell(5).SetCellValue(伸长率[i]);
                sheet1.GetRow(19 + i).GetCell(7).SetCellValue(横向冲击[i]);
                sheet1.GetRow(19 + i).GetCell(9).SetCellValue(纵向冲击[i]);
            }
            else
            {
                sheet2.GetRow(9 + i-5).GetCell(0).SetCellValue(luhaoArray[i]);
                sheet2.GetRow(9 + i - 5).GetCell(1).SetCellValue(C[i]);
                sheet2.GetRow(9 + i - 5).GetCell(2).SetCellValue(Mn[i]);
                sheet2.GetRow(9 + i - 5).GetCell(3).SetCellValue(Si[i]);
                sheet2.GetRow(9 + i - 5).GetCell(4).SetCellValue(P[i]);
                sheet2.GetRow(9 + i - 5).GetCell(5).SetCellValue(S[i]);
                sheet2.GetRow(9 + i - 5).GetCell(6).SetCellValue(Cr[i]);
                sheet2.GetRow(9 + i - 5).GetCell(7).SetCellValue(Ni[i]);
                sheet2.GetRow(9 + i - 5).GetCell(8).SetCellValue(Cu[i]);
                sheet2.GetRow(9 + i - 5).GetCell(9).SetCellValue(Mo[i]);
                sheet2.GetRow(9 + i - 5).GetCell(10).SetCellValue(Al[i]);
                sheet2.GetRow(9 + i - 5).GetCell(11).SetCellValue(Bi[i]);
                sheet2.GetRow(9 + i - 5).GetCell(12).SetCellValue(Sn[i]);
                sheet2.GetRow(9 + i - 5).GetCell(13).SetCellValue(Pb[i]);
                sheet2.GetRow(9 + i - 5).GetCell(14).SetCellValue(As[i]);
                sheet2.GetRow(9 + i - 5).GetCell(15).SetCellValue(Sb[i]);
                sheet2.GetRow(16 + i - 5).GetCell(0).SetCellValue(luhaoArray[i]);
                sheet2.GetRow(16 + i - 5).GetCell(1).SetCellValue(抗拉强度[i]);
                sheet2.GetRow(16 + i - 5).GetCell(3).SetCellValue(屈服极限[i]);
                sheet2.GetRow(16 + i - 5).GetCell(5).SetCellValue(伸长率[i]);
                sheet2.GetRow(16 + i - 5).GetCell(7).SetCellValue(横向冲击[i]);
                sheet2.GetRow(16 + i - 5).GetCell(9).SetCellValue(纵向冲击[i]);
            }

        }

        sheet1.GetRow(8).GetCell(13).SetCellValue(螺纹形式);
        sheet1.GetRow(9).GetCell(9).SetCellValue(chanpinbianhao.Text);
        sheet1.GetRow(24).GetCell(1).SetCellValue(备注);
        sheet1.GetRow(24).GetCell(12).SetCellValue(车号);
        sheet1.GetRow(24).GetCell(2).SetCellValue(备注);
       

        
        
        WriteToFile();
        Response.End();
    }

    //取出数据子函数
    protected void Button_Query_Click(object sender, EventArgs e)
    {
        String ckid = Request.QueryString["ckid"];
        //DEBUG 
        //ckid = "4";
        System.Data.SqlClient.SqlConnection Conn = new System.Data.SqlClient.SqlConnection();
        Conn.ConnectionString = ConfigurationManager.ConnectionStrings["SCMConnectionString1"].ConnectionString;
        Conn.Open();
        System.Data.SqlClient.SqlCommand Cmd = new System.Data.SqlClient.SqlCommand();
        Cmd.Connection = Conn;
        Cmd.CommandText = @"SELECT  dbo.产品出库单.序号, 
        dbo.产品.品名, 
        dbo.产品.钢级, 
        dbo.产品.规格, 
        dbo.产品销售合同.合同编号, 
        dbo.产品出库单.总长度, 
        dbo.产品出库单.总重量, 
        dbo.产品出库单.总支数, 
        dbo.产品出库单.总件数, 
        dbo.产品订货单位.名称,
        dbo.产品出库单.日期,
        dbo.产品.ID,
        dbo.产品出库单.车号,
        dbo.产品出库单.备注                
FROM  dbo.产品出库单 INNER JOIN
      dbo.产品销售合同 ON dbo.产品出库单.合同ID = dbo.产品销售合同.ID INNER JOIN
      dbo.产品 ON dbo.产品出库单.产品类别ID = dbo.产品.ID INNER JOIN
      dbo.产品订货单位 ON dbo.产品销售合同.订货单位ID = dbo.产品订货单位.ID 
where 产品出库单.ID=" + ckid;



        System.Data.SqlClient.SqlDataReader Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            序号 = Reader.GetInt32(0);
            pinming = Reader.GetString(1);
            gangji = Reader.GetString(2);
            guige = Reader.GetString(3);
            合同号 = Reader.GetString(4);
            总长度 = Reader.GetDecimal(5).ToString("0.00");
            总重量 = (Reader.GetDecimal(6) / 1000).ToString("0.000");
            总支数 = Reader.GetInt16(7).ToString();
            总件数 = Reader.GetByte(8).ToString();
            订货单位 = Reader.GetString(9);
            日期 = Reader.GetDateTime(10);
            产品ID = Reader.GetInt32(11);
            车号 = Reader.GetString(12);
            备注 = Reader.GetString(13);
        }
        Reader.Close();
        if (产品ID == 1 || 产品ID == 3)
        {
            螺纹形式 = "NU";
        }
        if (产品ID == 2 || 产品ID == 4 || 产品ID == 5 || 产品ID == 7)
        {
            螺纹形式 = "LC";
        }
        if (产品ID == 6)
        {
            螺纹形式 = "STC";
        }
        Cmd.CommandText = @"SELECT DISTINCT 
                      dbo.产品库存.炉号, dbo.产品理化参数.C, dbo.产品理化参数.Mn, dbo.产品理化参数.Si, dbo.产品理化参数.P, dbo.产品理化参数.S, dbo.产品理化参数.Cr, dbo.产品理化参数.Ni, 
                      dbo.产品理化参数.Cu, dbo.产品理化参数.Mo, dbo.产品理化参数.Al, dbo.产品理化参数.V, dbo.产品理化参数.Bi, dbo.产品理化参数.Sn, dbo.产品理化参数.Pb, dbo.产品理化参数.[As], 
                      dbo.产品理化参数.Sb, dbo.产品理化参数.抗拉强度, dbo.产品理化参数.屈服极限, dbo.产品理化参数.伸长率, dbo.产品理化参数.横向冲击, dbo.产品理化参数.纵向冲击, 
                      dbo.产品理化参数.通径检验, dbo.产品理化参数.静水压试验, dbo.产品理化参数.无损探伤, dbo.产品理化参数.表面检验, dbo.产品理化参数.尺寸
                      FROM         dbo.产品库存 INNER JOIN
                      dbo.产品理化参数 ON dbo.产品库存.炉号 = dbo.产品理化参数.炉号 where 出库单ID=" + ckid + " and dbo.产品理化参数.产品ID like " + 产品ID;

        Reader = Cmd.ExecuteReader();      
       while (Reader.Read())
        {
            //炉号 += Reader.GetString(0) + "</br>";
            luhaoArray[count] = Reader.GetString(0);
            if (Reader.GetString(1) == "")
            {
                C[count] = "—";
            }
            else
            {
                C[count] = Reader.GetString(1);
            }
            if (Reader.GetString(2) == "")
            {
                Mn[count] = "—";
            }
            else
            {
                Mn[count] = Reader.GetString(2);
            }
            if (Reader.GetString(3) == "")
            {
                Si[count] = "—";
            }
            else
            {
                Si[count] = Reader.GetString(3);
            } if (Reader.GetString(4) == "")
            {
                P[count] = "—";
            }
            else
            {
                P[count] = Reader.GetString(4);
            }
            if (Reader.GetString(5) == "")
            {
                S[count] = "—";
            }
            else
            {
                S[count] = Reader.GetString(5);
            }
            if (Reader.GetString(6) == "")
            {
                Cr[count] = "—";
            }
            else
            {
                Cr[count] = Reader.GetString(6);
            }
            if (Reader.GetString(7) == "")
            {
                Ni[count] = "—";
            }
            else
            {
                Ni[count] = Reader.GetString(7);
            }
            if (Reader.GetString(8) == "")
            {
                Cu[count] = "—";
            }
            else
            {
                Cu[count] = Reader.GetString(8);
            }
            if (Reader.GetString(9) == "")
            {
                Mo[count] = "—";
            }
            else
            {
                Mo[count] = Reader.GetString(9);
            }
            if (Reader.GetString(10) == "")
            {
                Al[count] = "—";
            }
            else
            {
                Al[count] = Reader.GetString(10);
            }
            if (Reader.GetString(11) == "")
            {
                V[count] = "—";
            }
            else
            {
                V[count] = Reader.GetString(11);
            }
            if (Reader.GetString(12) == "")
            {
                Bi[count] = "—";
            }
            else
            {
                Bi[count] = Reader.GetString(12);
            }
            if (Reader.GetString(13) == "")
            {
                Sn[count] = "—";
            }
            else
            {
                Sn[count] = Reader.GetString(13);
            }
            if (Reader.GetString(14) == "")
            {
                Pb[count] = "—";
            }
            else
            {
                Pb[count] = Reader.GetString(14);
            }
            if (Reader.GetString(15) == "")
            {
                As[count] = "—";
            }
            else
            {
                As[count] = Reader.GetString(15);
            }
            if (Reader.GetString(16) == "")
            {
                Sb[count] = "—";
            }
            else
            {
                Sb[count] = Reader.GetString(16);
            }
            if (Reader.GetString(17) == "")
            {
                抗拉强度[count] = "—";
            }
            else
            {
                抗拉强度[count] = Reader.GetString(17);
            }
            if (Reader.GetString(18) == "")
            {
                屈服极限[count] = "—";
            }
            else
            {
                屈服极限[count] = Reader.GetString(18);
            }
            if (Reader.GetString(19) == "")
            {
                伸长率[count] = "—";
            }
            else
            {
                伸长率[count] = Reader.GetString(19);
            }
            if (Reader.GetString(20) == "")
            {
                横向冲击[count] = "合格";
            }
            else
            {
                横向冲击[count] = Reader.GetString(20);
            }
            if (Reader.GetString(21) == "")
            {
                纵向冲击[count] = "合格";
            }
            else
            {
                纵向冲击[count] = Reader.GetString(21);
            }
            if (Reader.GetString(22) == "")
            {
                通径检验[count] = "合格";
            }
            else
            {
                通径检验[count] = Reader.GetString(22);
            }
            if (Reader.GetString(23) == "")
            {
                静水压试验[count] = "合格";
            }
            else
            {
                静水压试验[count] = Reader.GetString(23);
            }
            if (Reader.GetString(24) == "")
            {
                无损探伤[count] = "合格";
            }
            else
            {
                无损探伤[count] = Reader.GetString(24);
            }
            if (Reader.GetString(25) == "")
            {
                表面检验[count] = "合格";
            }
            else
            {
                表面检验[count] = Reader.GetString(25);
            }
            if (Reader.GetString(26) == "")
            {
                尺寸[count] = "合格";
            }
            else
            {
                尺寸[count] = Reader.GetString(26);
            }
            count++;
        }

        Reader.Close();
        Reader.Dispose();
        Cmd.Dispose();
        Conn.Dispose();

    }
</script>
<html>
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
p.big {line-height: 2}
p.big1 {line-height: 4}
.STYLE1 {
	font-size: 20px;
	font-weight: bold;
}
.STYLE2 {
	font-size: 24px;
	font-weight: bold;
}
</style>
</head>
<body>
    <form id="form1" runat="server">
     <script type="text/javascript" language="javascript" src="/common.js"></script>
    <div id="wintop" class="wintop">产品质量保证书</div>
        <asp:Panel ID="Panel3" runat="server" CssClass="panel">

        <asp:Button ID="Button_Query"
            runat="server" Text="查看报表" CssClass="button" UseSubmitBehavior="true" 
                onclick="Button_Query_Click" Visible="False" 
             />
            <asp:Button ID="Button_Save" runat="server" Text="导 出" CssClass="button" 
                UseSubmitBehavior="False" onclick="Button_Save_Click"/>
             <input id="Button" class="button" onclick="javascript:history.go(-1)"
              type="button" value="返回" />
            <br />
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server" CssClass="panel2">
            <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
        </asp:Panel>
    <div>
<div align="center">
<br />
 <b>陕西延长石油材料有限公司</b><br />
  <b>SHAANXI YANCHANG PETROLEUM MATERIAL CO.LTD</b><br />
    <b>产 品 质 量 证 明 书 
    </b><br />
    <b>INSPECTION CERTIFICATE</b><br />
</div>
<div  align="left" >
<table width="850" border="0" cellspacing="0">
  
</table>
</div>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="850" style="font-family:'宋体'; font-size:14px">
<tr>
    <td width="800" colspan="7">订货单位： <%=订货单位%></td>
    <td width="165" colspan="7" rowspan="2">No.：<%=序号 %></td>
    </tr>
    <tr>
    <td colspan="7"  >日期：<asp:TextBox ID="RiQi" runat="server" CssClass="intxt1" 
            Width="110px"></asp:TextBox>
        <img align="middle" alt="" 
            onclick="makecalendar(document.getElementById('RiQi0').value, document.getElementById('RiQi0'));" 
            src="../../../../../Icons/29.png" />
           
            
            </td>
    </tr>
   
</table>
<table border="1" cellspacing="0" cellpadding="0" width="850" style="font-family:'宋体'; font-size:12px">
     <tr>
    <td width="83" align="center" valign="middle"><p align="center"> 产品名称 Product <td width="143" align="center" valign="middle"><p align="center" class="big"><%=pinming %></p></td>
    <td width="84" align="center" valign="middle"><p align="center">&nbsp;技术标准 Spec</p></td>
    <td width="175" align="center" valign="middle"><p align="center" class="big">API Spec 5CT</p></td>
    <td width="104" align="center" valign="middle"><p align="center">&nbsp;合同编号 Contract No.  </p></td>
    <td width="138" align="center" valign="middle"><p align="center" class="big"><%=合同号  %></p></td>
    <td width="102" align="center" valign="middle"><p align="center">交货状态   Deliverycondition</p></td>
    <td width="98" align="center" valign="middle"><p align="center" class="big">正火</p></td>
  </tr>    
   <tr>
    <td width="83" align="center" valign="middle"><p align="center">&nbsp;钢 级</p></td>
    <td width="143" align="center" valign="middle"><p align="center" class="big"><%=gangji %></p></td>
    <td width="84" align="center" valign="middle"><p align="center">&nbsp;规 格(DxS) Size mm</td>
    <td width="175" align="center" valign="middle"><p align="center" class="big"><%=guige %></p></td>
    <td width="104" align="center" valign="middle"><p align="center" >&nbsp;&nbsp;总长度  m length</p></td>
    <td width="138" align="center" valign="middle"><p align="center" class="big"><%=总长度%></p></td>
    <td width="102" align="center" valign="middle"><p align="center">&nbsp; 螺 纹 形 式&nbsp;&nbsp; 
        &nbsp;Type of Thread </p></td>
    <td width="98" align="center" valign="middle"><p align="center" class="big"><%=螺纹形式 %></p></td>
  </tr>
</table>
<table border="1" cellspacing="0" cellpadding="0" width="850" style="font-family:'宋体'; font-size:13px">
  <tr>
    <td width="83" align="center" valign="middle"><p align="center">重量（t）Weight</p></td>
    <td width="72" align="center" valign="middle"><p align="center" class="big"><%=总重量 %></p></td>
    <td width="95" align="center" valign="middle"><p align="center">&nbsp;&nbsp;支 数 &nbsp; Price</p></td>
    <td width="60" align="center" valign="middle"><p align="center" class="big"><%=总支数 %></p></td>
    <td width="99" align="center" valign="middle"><p align="center">&nbsp;&nbsp;件 数 &nbsp; Bundles</p></td>
    <td width="48" align="center" valign="middle"><p align="center" class="big"><%=总件数 %></p></td>
    <td width="108" align="center" valign="middle"><p align="center">产 品 编 号 &nbsp;&nbsp;NO.</p></td>
    <td width="193" align="center" valign="middle" colspan="3"><p align="center" class="big">
        <asp:TextBox ID="chanpinbianhao" runat="server" Height="100%" Width="100%"></asp:TextBox>
        </p></td>
  
  </tr>
</table>
<table border="1" cellspacing="0" cellpadding="0" width="850" style="font-family:'宋体'; font-size:13px">
  <tr>
    <td colspan="17" align="center" valign="middle"><p align="center">化学成份(%) Chemical Composition</p></td>
  </tr>
   <tr>
    <td width="53" align="center" valign="middle"><p align="center">炉号</p></td>
    <td width="40" align="center" valign="middle"><p align="center">C</p></td>
    <td width="37" align="center" valign="middle"><p align="center">Mn</p></td>
    <td width="48" align="center" valign="middle"><p align="center">Si</p></td>
    <td width="48" align="center" valign="middle"><p align="center">P</p></td>
    <td width="48" align="center" valign="middle"><p align="center">S</p></td>
    <td width="48" align="center" valign="middle"><p align="center">Cr</p></td>
    <td width="63" align="center" valign="middle"><p align="center">Ni</p></td>
    <td width="48" align="center" valign="middle"><p align="center">Cu</p></td>
    <td width="55" align="center" valign="middle"><p align="center">Mo</p></td>
    <td width="52" align="center" valign="middle"><p align="center">Al</p></td>
    <td width="48" align="center" valign="middle"><p align="center">Bi</p></td>
    <td width="60" align="center" valign="middle"><p align="center">Sn</p></td>
    <td width="60" align="center" valign="middle"><p align="center">Pb</p></td>
    <td width="59" align="center" valign="middle"><p align="center">As</p></td>
    <td width="64" align="center" valign="middle"><p align="center">Sb</p></td>
  </tr>
  <% for (int i = 0; i < count; i++)
     {%>
    <tr>
    <td width="53" align="center" valign="middle"><p align="center"><%=luhaoArray[i] %></p></td>
    <td width="40" align="center" valign="middle"><p align="center"><%=C[i]  %></p></td>
    <td width="37" align="center" valign="middle"><p align="center"><%=Mn[i] %></p></td>
    <td width="48" align="center" valign="middle"><p align="center"><%=Si[i] %></p></td>
    <td width="48" align="center" valign="middle"><p align="center"><%=P[i]  %></p></td>
    <td width="48" align="center" valign="middle"><p align="center"><%=S[i]  %></p></td>
    <td width="48" align="center" valign="middle"><p align="center"><%=Cr[i] %></p></td>
    <td width="63" align="center" valign="middle"><p align="center"><%=Ni[i] %></p></td>
    <td width="48" align="center" valign="middle"><p align="center"><%=Cu[i] %></p></td>
    <td width="55" align="center" valign="middle"><p align="center"><%=Mo[i] %></p></td>
    <td width="52" align="center" valign="middle"><p align="center"><%=Al[i] %></p></td>
    <td width="48" align="center" valign="middle"><p align="center"><%=Bi[i] %></p></td>
    <td width="60" align="center" valign="middle"><p align="center"><%=Sn[i] %></p></td>
    <td width="60" align="center" valign="middle"><p align="center"><%=Pb[i] %></p></td>
    <td width="59" align="center" valign="middle"><p align="center"><%=As[i] %></p></td>
    <td width="64" align="center" valign="middle"><p align="center"><%=Sb[i] %></p></td>
     </tr>
    <% }
   %>
  
</table>
<table border="1" cellspacing="0" cellpadding="0" width="850" style="font-family:'宋体'; font-size:13px">
  <tr>
    <td colspan="4"><div align="center">拉伸试验(纵向)<br>Tensile Test(Longitudinal)</div></td>
    <td colspan="2"><div align="center">冲击试验<br>J Inpact value</div></td>
    <td width="72" rowspan="2"><div align="center">通径检验 Drifring</div></td>
    <td width="73" rowspan="2"><div align="center">静水压试验 H.W.P</div></td>
    <td width="65" rowspan="2"><div align="center">无损探伤 NDE</div></td>
    <td width="72" rowspan="2"><div align="center">表面检验 Surface</div></td>
    <td width="77" rowspan="2"><div align="center">尺寸 Demenition</div></td>
  </tr>
  <tr>
    <td width="55"><div align="center">炉号</div></td>
    <td width="87"><div align="center">抗拉强度(Mpa)<br>TS</div></td>
    <td width="78"><div align="center">屈服极限(Mpa)<br>
    YS</div></td>
    <td width="76"><div align="center">伸长率,A(%)<br>
    E.L</div></td>
    <td width="84"><div align="center">横向冲击<br>AK Widthwise</div></td>
    <td width="87"><div align="center">纵向冲击<br>AK Lengthwise</div></td>
  </tr>
  <% for (int i = 0; i <count; i++)
     {
       if (i == 0)
  {%>
  <tr>
    <td><div align="center"><span class="big"><%=luhaoArray[i]%></span></div></td>
    <td><div align="center"><%=抗拉强度[i] %></div></td>
    <td><div align="center"><%=屈服极限[i]%></div></td>
    <td><div align="center"><%=伸长率[i]%></div></td>
    <td><div align="center"><%=横向冲击[i]%></div></td>
    <td><div align="center"><%=纵向冲击[i]%></div></td>
    <td rowspan="5"><div align="center"><%=通径检验[i] %></div></td>
    <td rowspan="5"><div align="center"><%=静水压试验[i] %></div></td>
    <td rowspan="5"><div align="center"><%=无损探伤[i] %></div></td>
    <td rowspan="5"><div align="center"><%=表面检验[i] %></div></td>
    <td rowspan="5"><div align="center"><%=尺寸[i]%></div></td>
  </tr>
   <%}
            else
            {%>
  <tr>
    <td><div align="center"><span class="big"><%=luhaoArray[i]%></span></div></td>
    <td><div align="center"><%=抗拉强度[i]%></div></td>
    <td><div align="center"><%=屈服极限[i]%></div></td>
    <td><div align="center"><%=伸长率[i]%></div></td>
    <td><div align="center"><%=横向冲击[i]%></div></td>
    <td><div align="center"><%=纵向冲击[i]%></div></td>
  </tr>
             <% 
            }
        }
          
     %>
</table>
<table border="1" cellspacing="0" cellpadding="0" width="850" style="font-family:'宋体'; font-size:13px">
  <tr>
    <td width="83" align="center" valign="middle"><p align="center">备注&nbsp; Remark</p></td>
    <td width="580" align="center" valign="middle"><p align="center"><%=备注%></p></td>
    <td width="93" align="center" valign="middle"><p align="center">车号</p></td>
    <td width="253" valign="middle"><p ><%=车号  %></p></td>
  </tr>
</table>
<table border="1" cellspacing="0" cellpadding="0" width="850" style="font-family:'宋体'; font-size:13px">
  <tr>
    <td colspan="17" align="center" valign="middle"><p align="left">地址：陕西省西安市枣园东路31(Add:No.31,Zaoyuan East Road,Xi’an,ShaanXi)&nbsp; 邮编(P.C)：710077&nbsp;Email:shi you cai liao @ 163.com</p></td>
  </tr>
  <tr>
    <td colspan="17" align="center" valign="middle"><p align="left">电话(Tel)：(029)84622961           传真(Fax)：(029)846229619)84622961</p></td>
  </tr>
 </table>
    <br />
    <div style="width: 850">
        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;质量主管&nbsp;：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;审核：&nbsp; </span>
        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;判定员：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
        </div>
   </div>
</div>
    </form>
</body>
</html>
